package mest.service.Modeling.Impl;

import mest.dao.Modeling.IprovideTypeDao;
import mest.entity.provider_type;
import mest.service.Modeling.IproviderTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-15 23:32
 */

@Service
public class providerTypeServiceImpl implements IproviderTypeService {

    @Resource
    private IprovideTypeDao iptd;


    @Override
    public int insertProvideType(provider_type ct) {
        try {
            return iptd.insertProvideType(ct);
        } catch (Exception e) {
            e.printStackTrace();
        }

        return 0;
    }

    @Override
    public int selectCount() {
        return iptd.selectCount();
    }

    @Override
    public List<provider_type> findProvideTypePage(int index, int pageSize) {
        return iptd.findProvideTypePage((index-1)*pageSize,pageSize);
    }
}
